home *** CD-ROM | disk | FTP | other *** search
/ Millennium Gold 2000 / Millennium Gold 2000 - Disc 1.iso / HYPEROID / WINEXT.H < prev   
C/C++ Source or Header  |  1994-04-12  |  3KB  |  125 lines

  1. // ***************************************************************************
  2. // WINEXT.H - additional windows definitions
  3. //
  4. // Version 1.0  03/21/89  Copyright (C) 1989,90,91 Lantern Coroporation.
  5. // Author: Edward Hutchins
  6. // Status: Freeware
  7. // Revisions:
  8. // 06/06/90 modified HUGE to LARGE to preserve compatibility with math.h
  9. //          also nested windows.h include to prevent modifications on the
  10. //          actual source file - Ed.
  11. // 10/01/90 added CONST and CONSTP,NP,LP,HP and a few comments - Ed.
  12. // 08/28/91 added EXPORT and SEGMENT - Ed.
  13. // 10/28/91 added DLLEXP - Ed.
  14. // 11/02/91 posted on Compuserve - Ed.
  15. //
  16. // 03/04/92 ported to Win32 - Paul Tissue & Robert Hess [Microsoft].
  17. // ***************************************************************************
  18.  
  19. #if !defined(WINEXT_H)
  20. #define WINEXT_H
  21.  
  22. #if defined(__cplusplus)
  23. extern "C" {
  24. #endif // __cplusplus
  25.  
  26. //-- some handy Win32 porting macros
  27. #ifdef WIN32
  28.   #define huge
  29.   #define MoveTo(hDC, X, Y)         MoveToEx         ( hDC, X, Y, NULL )
  30.   #define SetWindowExt(hDC, X, Y)   SetWindowExtEx   ( hDC, X, Y, NULL )
  31.   #define SetViewportExt(hDC, X, Y) SetViewportExtEx ( hDC, X, Y, NULL )
  32.   #define SetViewportOrg(hDC, X, Y) SetViewportOrgEx ( hDC, X, Y, NULL )
  33. #endif
  34.  
  35. #include <windows.h>
  36.  
  37. #ifndef UNREFERENCED_PARAMETER
  38. #define UNREFERENCED_PARAMETER(a) (a = a)
  39. #endif
  40.  
  41. //
  42. // extra data types and defines
  43. //
  44.  
  45. #define LARGE _far
  46. #ifndef CDECL
  47.   #define CDECL cdecl
  48. #endif
  49. #define CONST const
  50. #define HNULL (0)
  51. #define LPNULL (0L)
  52.  
  53. #ifndef WIN32
  54. typedef char        CHAR;
  55. typedef int         INT;
  56. typedef float       FLOAT;
  57. #endif
  58.  
  59. typedef double      DOUBLE;
  60. typedef double      LDOUBLE;
  61.  
  62. // extend the string type
  63. typedef CHAR *HPSTR;
  64.  
  65. // useful macros for typedefing pointers to objects //
  66. #define npointerdef(o) typedef o FAR * NP ## o
  67. #define lpointerdef(o) typedef o FAR * LP ## o
  68. #define hpointerdef(o) typedef o FAR * HP ## o
  69. #define pointerdef(o) npointerdef(o); lpointerdef(o); hpointerdef(o);
  70.  
  71. // define the different kinds of pointers to things //
  72. pointerdef( BOOL );
  73. npointerdef( BYTE );
  74. pointerdef( CHAR );
  75. npointerdef( INT );
  76. hpointerdef( INT );
  77. npointerdef( WORD );
  78. hpointerdef( WORD );
  79. npointerdef( LONG );
  80. hpointerdef( LONG );
  81. npointerdef( DWORD );
  82. hpointerdef( DWORD );
  83. pointerdef( FLOAT );
  84. pointerdef( DOUBLE );
  85. pointerdef( LDOUBLE );
  86. npointerdef( HANDLE );
  87. hpointerdef( HANDLE );
  88. npointerdef( VOID );
  89. hpointerdef( VOID );
  90.  
  91. // these are here for compatibility - use NPVOID etc...
  92. typedef VOID NEAR *NPMEM;
  93. typedef VOID FAR *LPMEM;
  94.  
  95. // window proc function pointer
  96. #ifndef WIN32
  97. typedef LONG (FAR PASCAL *WNDPROC)( HWND, UINT, UINT, LONG );
  98. #endif
  99.  
  100. //
  101. // scope protocol definitions
  102. //
  103.  
  104. #define GLOBAL      // GLOBAL
  105. #define LOCAL       static
  106. #define IMPORT      extern
  107. #define FROM(where) // FROM where
  108. #define PROTO       // PROTOTYPE
  109.  
  110. #define EXPORT _export
  111. #define SEGMENT _segment
  112.  
  113. #if defined(__cplusplus)
  114. }
  115. #endif // __cplusplus
  116.  
  117. // c++ class export type
  118. #if defined(__DLL__)
  119. #define DLLEXP EXPORT
  120. #else
  121. #define DLLEXP LARGE
  122. #endif
  123.  
  124. #endif // WINEXT_H
  125.